Skip to content

fix: 2 improvements across 3 files#1524

Open
tomaioo wants to merge 3 commits into
opencomponents:masterfrom
tomaioo:improve/quality/typo-in-filename-templace-oc-version-sho
Open

fix: 2 improvements across 3 files#1524
tomaioo wants to merge 3 commits into
opencomponents:masterfrom
tomaioo:improve/quality/typo-in-filename-templace-oc-version-sho

Conversation

@tomaioo

@tomaioo tomaioo commented Jul 23, 2026

Copy link
Copy Markdown

Summary

fix: 2 improvements across 3 files

Problem

Severity: Low | File: packages/oc/src/registry/domain/validators/templace-oc-version.ts:L1

The file templace-oc-version.ts contains a typo ('templace' instead of 'template'). This typo propagates to import paths in validators/index.ts and validators/registry-configuration.ts, reducing code readability and discoverability.

Solution

Rename the file to template-oc-version.ts and update all corresponding import statements across the repository.

Changes

  • packages/oc/src/registry/domain/validators/template-oc-version.ts (new)
  • packages/oc/src/registry/domain/validators/templace-oc-version.ts (modified)
  • packages/oc/src/registry/routes/helpers/get-components-history.ts (modified)

tomaioo added 3 commits July 23, 2026 06:52
- Quality: Typo in filename: 'templace-oc-version' should be 'template-oc-version'
- Quality: Typo in interface name: 'UnformmatedComponentHistory'

Signed-off-by: tomaioo <203048277+tomaioo@users.noreply.github.com>
- Quality: Typo in filename: 'templace-oc-version' should be 'template-oc-version'
- Quality: Typo in interface name: 'UnformmatedComponentHistory'

Signed-off-by: tomaioo <203048277+tomaioo@users.noreply.github.com>
- Quality: Typo in filename: 'templace-oc-version' should be 'template-oc-version'
- Quality: Typo in interface name: 'UnformmatedComponentHistory'

Signed-off-by: tomaioo <203048277+tomaioo@users.noreply.github.com>

@ricardo-devis-agullo ricardo-devis-agullo left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the cleanup — the intent is good, but the filename rename is incomplete and would break the build if merged as-is.

What works

  • Renaming UnformmatedComponentHistoryUnformattedComponentHistory in get-components-history.ts looks correct (local type only).

What needs fixing

1. Import not updated

packages/oc/src/registry/domain/validators/index.ts still has:

import templateOcVersionValidator from './templace-oc-version';

That is the only importer of this module (call sites go through validateTemplateOcVersion). After the rename it must be:

import templateOcVersionValidator from './template-oc-version';

The PR description says imports in index.ts / registry-configuration.ts were updated — they were not. (registry-configuration.ts never imported this file.)

2. Old file should be deleted, not emptied

The diff zeros out templace-oc-version.ts instead of removing it. Prefer a real rename:

git mv packages/oc/src/registry/domain/validators/templace-oc-version.ts        packages/oc/src/registry/domain/validators/template-oc-version.ts

…then update the import in index.ts.

Checklist before re-review

  • templace-oc-version.ts is gone
  • template-oc-version.ts has the previous contents
  • validators/index.ts imports ./template-oc-version
  • CI green on 22/24/26

Happy to approve once those are in.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants